package com.grm.strategy.handler.impl;


import com.grm.strategy.entity.User;
import com.grm.strategy.factory.Factory;
import com.grm.strategy.handler.Handler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class Handler3 extends Handler {
    @Override
    public User queryUser(User user) {
        user.setId(1L);
        user.setUsername("2ww");
        user.setPhone("154286873354");
        user.setAge(16);
        // 业务逻辑3
        log.info("Handler3 queryUser----------------------------{}", user);
        return user;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        Factory.register("ccc", this);
    }
}
